/**正则 */
const ACCOUNT = /^\d{6}$/;//账号
const PWD = /^\d{6}$/;//密码
export const isNull = (rules, value, callBack) => {
    if (!value || value.length == 0) {
        callBack(new Error("不能为空"));
    } else {
        callBack();
    }
};
// 账号
export const checkAccount = (rules, value, callBack) => {
    if (!value) {
        callBack(new Error("不能为空"));
    } else if (!ACCOUNT.test(value)) {
        callBack(new Error("请输入不低于6位数字"));
    } else {
        callBack();
    }
};
// 密码
export const checkPwd = (rules, value, callBack) => {
    if (!value) {
        callBack(new Error("不能为空"));
    } else if (!PWD.test(value)) {
        callBack(new Error("请输入不低于6位数字"));
    } else {
        callBack();
    }
};
